create or replace package GD_KICH_HOAT_THE_P is
/*
|| purpose: basic rutines for table GD_KICH_HOAT_THE
||
|| created by: tinhth
*/

/*insert one record into Db, no commit*/
procedure insert_gd_kich_hoat_the (
		op_id out GD_KICH_HOAT_THE.ID%TYPE
		,ip_id_the_kich_hoat in GD_KICH_HOAT_THE.ID_THE_KICH_HOAT%TYPE
		,ip_thoi_gian_kich_hoat in GD_KICH_HOAT_THE.THOI_GIAN_KICH_HOAT%TYPE
		,ip_kich_hoat_account in GD_KICH_HOAT_THE.KICH_HOAT_ACCOUNT%TYPE
		,ip_kenh_kich_hoat in GD_KICH_HOAT_THE.KENH_KICH_HOAT%TYPE
		,ip_mobile_kich_hoat in GD_KICH_HOAT_THE.MOBILE_KICH_HOAT%TYPE
		,ip_kich_hoat_thanh_cong_yn in GD_KICH_HOAT_THE.KICH_HOAT_THANH_CONG_YN%TYPE
		);
/*delete using ID, no commit*/
procedure delete_gd_kich_hoat_the (
		ip_id GD_KICH_HOAT_THE.ID%TYPE
		);
/*update entire record, no commit*/
procedure update_gd_kich_hoat_the (
		 ip_id in GD_KICH_HOAT_THE.ID%TYPE
		,ip_id_the_kich_hoat in GD_KICH_HOAT_THE.ID_THE_KICH_HOAT%TYPE
		,ip_thoi_gian_kich_hoat in GD_KICH_HOAT_THE.THOI_GIAN_KICH_HOAT%TYPE
		,ip_kich_hoat_account in GD_KICH_HOAT_THE.KICH_HOAT_ACCOUNT%TYPE
		,ip_kenh_kich_hoat in GD_KICH_HOAT_THE.KENH_KICH_HOAT%TYPE
		,ip_mobile_kich_hoat in GD_KICH_HOAT_THE.MOBILE_KICH_HOAT%TYPE
		,ip_kich_hoat_thanh_cong_yn in GD_KICH_HOAT_THE.KICH_HOAT_THANH_CONG_YN%TYPE
		);
/*
|| Kich hoat the
*/
procedure kich_hoat_the(ma_kich_hoat in DM_KHO_MA_THE_IN.MA_KICH_HOAT%TYPE
		,ip_kich_hoat_account in GD_KICH_HOAT_THE.KICH_HOAT_ACCOUNT%TYPE
		,ip_kenh_kich_hoat in GD_KICH_HOAT_THE.KENH_KICH_HOAT%TYPE
		,ip_mobile_kich_hoat in GD_KICH_HOAT_THE.MOBILE_KICH_HOAT%TYPE
    ,op_ket_qua_kich_hoat out varchar2);

/*END-OF-PACKAGE*/
end GD_KICH_HOAT_THE_P;
/
create or replace package body GD_KICH_HOAT_THE_P is
/*
|| purpose: basic rutines for table GD_KICH_HOAT_THE
||
|| created by: tinhth
*/

/*insert one record into Db, no commit*/
procedure insert_gd_kich_hoat_the (
		op_id out GD_KICH_HOAT_THE.ID%TYPE
		,ip_id_the_kich_hoat in GD_KICH_HOAT_THE.ID_THE_KICH_HOAT%TYPE
		,ip_thoi_gian_kich_hoat in GD_KICH_HOAT_THE.THOI_GIAN_KICH_HOAT%TYPE
		,ip_kich_hoat_account in GD_KICH_HOAT_THE.KICH_HOAT_ACCOUNT%TYPE
		,ip_kenh_kich_hoat in GD_KICH_HOAT_THE.KENH_KICH_HOAT%TYPE
		,ip_mobile_kich_hoat in GD_KICH_HOAT_THE.MOBILE_KICH_HOAT%TYPE
		,ip_kich_hoat_thanh_cong_yn in GD_KICH_HOAT_THE.KICH_HOAT_THANH_CONG_YN%TYPE
		)  is
begin
	op_id := db_utils_p.get_object_id();
	insert into GD_KICH_HOAT_THE(
		 ID
		,ID_THE_KICH_HOAT
		,THOI_GIAN_KICH_HOAT
		,KICH_HOAT_ACCOUNT
		,KENH_KICH_HOAT
		,MOBILE_KICH_HOAT
		,KICH_HOAT_THANH_CONG_YN
	 )
	values (
		 op_id
		,ip_id_the_kich_hoat
		,ip_thoi_gian_kich_hoat
		,ip_kich_hoat_account
		,ip_kenh_kich_hoat
		,ip_mobile_kich_hoat
		,ip_kich_hoat_thanh_cong_yn
	 );
end insert_gd_kich_hoat_the;
/*
|| delete using ID, no commit
*/
procedure delete_gd_kich_hoat_the (
		ip_id GD_KICH_HOAT_THE.ID%TYPE
		) is
begin
	delete from GD_KICH_HOAT_THE where ID = ip_id;
end delete_gd_kich_hoat_the;
/*
|| update entire record, no commit
*/
procedure update_gd_kich_hoat_the (
		 ip_id in GD_KICH_HOAT_THE.ID%TYPE
		,ip_id_the_kich_hoat in GD_KICH_HOAT_THE.ID_THE_KICH_HOAT%TYPE
		,ip_thoi_gian_kich_hoat in GD_KICH_HOAT_THE.THOI_GIAN_KICH_HOAT%TYPE
		,ip_kich_hoat_account in GD_KICH_HOAT_THE.KICH_HOAT_ACCOUNT%TYPE
		,ip_kenh_kich_hoat in GD_KICH_HOAT_THE.KENH_KICH_HOAT%TYPE
		,ip_mobile_kich_hoat in GD_KICH_HOAT_THE.MOBILE_KICH_HOAT%TYPE
		,ip_kich_hoat_thanh_cong_yn in GD_KICH_HOAT_THE.KICH_HOAT_THANH_CONG_YN%TYPE
		) is
begin
	update GD_KICH_HOAT_THE
	 set
		 ID_THE_KICH_HOAT = ip_id_the_kich_hoat
		,THOI_GIAN_KICH_HOAT = ip_thoi_gian_kich_hoat
		,KICH_HOAT_ACCOUNT = ip_kich_hoat_account
		,KENH_KICH_HOAT = ip_kenh_kich_hoat
		,MOBILE_KICH_HOAT = ip_mobile_kich_hoat
		,KICH_HOAT_THANH_CONG_YN = ip_kich_hoat_thanh_cong_yn
	where ID = ip_id;
end update_gd_kich_hoat_the;
/*
|| Kich hoat the
*/
procedure kich_hoat_the(ma_kich_hoat in DM_KHO_MA_THE_IN.MA_KICH_HOAT%TYPE
		,ip_kich_hoat_account in GD_KICH_HOAT_THE.KICH_HOAT_ACCOUNT%TYPE
		,ip_kenh_kich_hoat in GD_KICH_HOAT_THE.KENH_KICH_HOAT%TYPE
		,ip_mobile_kich_hoat in GD_KICH_HOAT_THE.MOBILE_KICH_HOAT%TYPE
    ,op_ket_qua_kich_hoat out varchar2)
is
begin
     --1. kiem tra ma the kich hoat
     NULL;
     --2.
end kich_hoat_the;
/*END-OF-PACKAGE*/
end GD_KICH_HOAT_THE_P;
/
